<%@page import="com.windfone.common.Constant"%>
<%@ page language="java" contentType="text/html; charset=utf-8"    pageEncoding="utf-8"%>

<%@ taglib uri="/WEB-INF/recommend.tld" prefix="windfone" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>风驰电讯  您最贴心的手机顾问  用户密码管理</title>
<%@ include file="headkey.jsp"%>
<script src="js/jquery-1.4.2.js"></script>
<script>
	function submitFun(){
		var password =  $("#password").val();
		var newpassword =   $("#newpassword").val();
		var configpassword =  $("#configpassword").val();
		if ( newpassword != configpassword ){
			alert("两次输入密码不匹配");
			$("#newpassword").focus();
			return false;
		}
		if ( password != "" && newpassword  != "" && newpassword == configpassword ){
			$.ajax({
				type:'post',
				url:'changePwd.action',
				data:{password:password,newpassword:newpassword},
				datatype:'json',
				success:function(msg){
		        	var data = eval(msg);
		        	if ( data == 1){
			        	alert("密码更新成功");
		        	}
				}
			}); 
		} else {
			alert("请确认输入旧密码是否正确");
			 $("#password").focus();
		}
	}
	 

</script>
<link href="css/css.css" rel="stylesheet" type="text/css" />
</head>

<body id="pages9">

<!--头部-->
<%@ include file="navigate.jsp"%>
<!--内容-->
<div class="contentBox">
<div class="col1">
  <%@ include file="memberPersonInfo.jsp"%>   
  <%@ include file="memberQryOrder.jsp"%> 
</div>
<!--左区-->
<div class="col2">
  <div class="tabLeBoxB" style=" padding-top:0">
  <div class="title">
    <h3>修改密码</h3></div>
<div class="borderBox">
<table class="tbl1">
				 <tbody><tr>
					<td class="lab">会员账号</td>
					<td class="input"><s:property value="bean.loginName"/></td>
				</tr>
				<tr>
					<td class="lab">当前密码</td>
					<td class="input"><input name="password" maxlength="50" id="password"   type="password"/></td>
				</tr>
				<tr>
					<td class="lab">新密码</td>
					<td class="input"><input name="newpassword" maxlength="50" id="newpassword"   type="password"/></td>
				</tr>
				<tr>
					<td class="lab">确认新密码</td>
					<td class="input"><input name="configpassword" maxlength="50" id="configpassword"   type="password"/></td>
				</tr>
				<tr>
				  <td class="lab">&nbsp;</td>
				  <td class="input"><input type="button" name="button2" id="button2" value="确定"  onclick="submitFun();return false;" /></td>
				  </tr>
	        </tbody>
</table>
  <div class="clear"></div>
</div>
</div>
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
 <%@ include file="bottom.jsp"%>
</body>
</html>
